<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>高压氧地下室自查记录</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.2.0.css" />
    <style>
        .form-container {
            width: 100%;
            padding-top: 20px;
        }

        .form-container>h2 {
            margin: 0 auto;
            width: 500px;
            text-align: center;
        }

        .form-container>.form-wrapper {
            display: -webkit-flex;
            display: flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            padding-top: 20px;
        }

        .form-container>.form-wrapper>div {
            width: 50%;
            margin-top: 10px;
        }

        .form-container>.form-wrapper>div>span {
            vertical-align: middle;
        }

        .form-container>.form-wrapper>div>span:nth-child(1) {
            display: inline-block;
            width: 30%;
            height: 30px;
            font-size: 14px;
            text-align: center;
        }

        .form-container>.form-wrapper>div>input {
            display: inline-block;
            width: 70%;
            height: 25px !important;
            font-size: 14px;
            text-align: center;
            vertical-align: middle;
            overflow: hidden;
            border: 1px solid rgba(0, 0, 0, 0.3);
        }

        .aui-form-list-wrapper,
        .aui-form-list-info-wrapper {
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .aui-form-list-wrapper>li {
            width: 33.33%;
        }

        .aui-form-list-wrapper-content {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            justify-content: flex-start;
            flex-wrap: wrap;
            margin: 10px 0;
        }

        .header {
            text-align: center;
        }

        .aui-form-list-wrapper-content>li {
            width: 50%;
        }

        .aui-list-item-label {
            width: 100% !important;
        }

        .form-submit {
            width: 100%;
            text-align: center;
            margin-top: 50px;
        }

        .form-submit>button {
            width: 170px;
            height: 50px;
            text-align: center;
            background-color: #0064B0;
            color: #fff;
            padding-bottom: 10px;
            font-size: 20px;
        }

        .aui-list-item-input {
            color: #666 !important;
        }

        .aui-list-item-label,
        .aui-list-item-input,
        input[type="text"] {
            font-size: 0.6rem;
        }

        .textarea-container {
            width: 100%;
            margin: 0 auto;
        }

        .textarea-wrapper {
            min-height: 100px;
            border: 1px solid rgba(0, 0, 0, 0.3);
            width: 97%;
            margin: 20px auto 5px auto;
            border-radius: 5px;
        }
    </style>
</head>

<body>
    <main id="app">
        <!-- <div class="form-container">
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                日期：无需填写
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                消毒时间：
                            </div>
                            <div class="aui-list-item-input" id="adTime">
                                <input type="text" placeholder="消毒时间">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label">
                                累计时间：
                            </div>
                            <div class="aui-list-item-input" id="adCumulativeTime">
                                <input type="text" placeholder="累计时间">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div> -->
        <div>
            <div class="header">
                检查日期
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                日期：
                            </div>
                            <div class="aui-list-item-input" id="bsTime" onclick="getDateTime()">
                                {{getDateTime}}
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                签名：
                            </div>
                            <div class="aui-list-item-input">
                                <input type="text" id="bsAutograph" placeholder="请填写签名">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                治疗舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                空气过滤器：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsFilterTreat" value="1" checked
                                    id="bsFilterTreat">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                气动薄膜阀：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsDiaphragmTreat" value="1" checked
                                    id="bsDiaphragmTreat">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                过渡舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                空气过滤器：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsFilterTransition" value="1" checked
                                    id="bsFilterTransition">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                气动薄膜阀：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsDiaphragmTransition" value="1"
                                    checked id="bsDiaphragmTransition">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                抢救舱
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                空气过滤器：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsFilterRescue" value="1" checked
                                    id="bsFilterRescue">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                气动薄膜阀：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsDiaphragmRescue" value="1" checked
                                    id="bsDiaphragmRescue">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                其他
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                电动吸引器：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsElectricAspirator" value="1" checked
                                    id="bsElectricAspirator">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                各管路、管线：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsPiping" value="1" checked
                                    id="bsPiping">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div>
            <div class="header">
                高压氧科
            </div>
            <div class="aui-content aui-margin-b-15">
                <ul class="aui-list aui-form-list aui-form-list-wrapper-content">
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                空气压缩机Ⅰ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsAirCompressor" value="1" checked
                                    id="bsAirCompressor">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                空气压缩机Ⅱ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsAirCompressores" value="1" checked
                                    id="bsAirCompressores">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                冷干机Ⅰ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsColdDryer" value="1" checked
                                    id="bsColdDryer">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                冷干机Ⅱ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsColdDryeres" value="1" checked
                                    id="bsColdDryeres">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                储气罐Ⅰ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsAirTank" value="1" checked
                                    id="bsAirTank">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                储气罐Ⅱ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsAirTankes" value="1" checked
                                    id="bsAirTankes">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                储气罐Ⅲ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsAirTankess" value="1" checked
                                    id="bsAirTankess">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                油水分离器Ⅰ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsWaterSepar" value="1" checked
                                    id="bsWaterSepar">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                油水分离器Ⅱ：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="通风"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsWaterSepares" value="1" checked
                                    id="bsWaterSepares">
                            </div>
                        </div>
                    </li>
                    <li class="aui-list-item">
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-label aui-list-item-input">
                                消防水罐：
                            </div>
                            <div class="aui-list-item-input">
                                <!-- <input type="text" placeholder="地面"> -->
                                <input class="aui-checkbox" type="checkbox" name="bsWaterPipe" value="1" checked
                                    id="bsWaterPipe">
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="textarea-container">
            <div>备注</div>
            <div contenteditable="true" class="textarea-wrapper" id="bsRemarks">
            </div>
        </div>
        <div class="form-submit">
            <button onclick="Insert_HO_YcDisinfectionRecord()">提交</button>
        </div>
    </main>
</body>

</html>

<script src="../script/api.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/vue.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/jquery.min.js" charset="utf-8" type="text/javascript"></script>
<script src="../js/ToConfigure.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-toast.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-dialog.js" charset="utf-8" type="text/javascript"></script>
<script src="../script/aui-tab.js" charset="utf-8" type="text/javascript"></script>
<script type="text/javascript">
    var vm;
    apiready = function () {
        vm = new Vue({
            el: '#app',
            data: {
                Query_UserList: [], //舱室操舱人员信息
                getDateTime: '选择日期',
                getTime: '选择时间'
            },
            created() {

            },
            watch: {
                searchInfo: function () { }
            },
            methods: {

            },
        })
    }
    // //选择时间
    // function getDateTime() {
    //     let _this = this;
    //     api.openPicker({
    //         type: 'date',
    //         title: '选择开始日期'
    //     }, function (ret, err) {
    //         if (ret) {
    //             var month = ret.month > 9 ? ret.month : '0' + ret.month;
    //             var day = ret.day > 9 ? ret.day : '0' + ret.day;
    //             vm.getDateTime = '' + ret.year +
    //                 '-' + month +
    //                 '-' + day
    //         }
    //     });
    // }


    function getTime() {
        api.openPicker({
            type: 'time',
            date: '08:30',
            title: '选择升压时间'
        }, function (ret, err) {
            if (ret) {
                vm.getTime = ret.hour +
                    ':' + ret.minute;
                console.log(ret.minute);
            }
        });
    }


    function closewin() {
        api.closeWin({
            name: 'disinfection-record-form'
        });
    }




    //添加高压氧消毒记录
    function Insert_HO_YcDisinfectionRecord() {

        //定义toast提示框
        var toast = new auiToast();
        var JsonStr = GetParameters();
        //获取所属医院IP地址
        var Url_IP = ToConfigure_IP("Gorgeous");
        if (JsonStr !== "") {
            $.ajax({
                url: Url_IP + '/disinfectioninspection/basementself/insertHoBasementSelf',
                type: 'post',
                async: false,
                contentType: "application/json",
                dataType: "json",
                data: JsonStr,
                success: function (result) {
                    /**
                     * 验证返回信息是否为空
                     */
                    if (result.success == true) {
                        /**
                         * 操作成功提醒
                         */
                        JumpPage();
                    } else {
                        /**
                         *  提示错误信息
                         */
                        toast.fail({
                            title: "加载失败",
                            duration: 2000
                        });
                    }
                },
                error: function (result) {
                    /**
                     *  提示错误信息
                     */
                    toast.fail({
                        title: "加载失败",
                        duration: 2000
                    });
                }
            })
        }
    }

    //跳转页面
    function JumpPage() {
        var dialog = new auiDialog();
        dialog.alert({
            title: "提示",
            msg: '操作成功，是否跳转地下室自查记录',
            buttons: ['取消', '确定']
        }, function (ret) {
            if (ret.buttonIndex === 1) {

            } else if (ret.buttonIndex === 2) {
                api.openWin({
                    name: 'HO_BasementSelf-header',
                    url: './HO_BasementSelf-header.html',
                    pageParam: {}
                });
            }
        })
    }





    //获取参数添氧舱消毒记录
    function GetParameters() {
        var jsParms = new Object();
        /**
     * 日期
     */
        jsParms.bsTime = $("#bsTime").text();
        /**
         * 签名
         */
        jsParms.bsAutograph = api.pageParam["userName"];
        /**
         * 备注
         */
        jsParms.bsRemarks = $("#bsRemarks").text();
        /**
         * 舱门   单选按钮选中的话给周赋值
         */
        $('input[name=bsFilterTreat]:checked').each(function () {
            jsParms.bsFilterTreat = $(this).val();
        });
        if (jsParms.bsFilterTreat == null || jsParms.bsFilterTreat == undefined) {
            jsParms.bsFilterTreat = 0;
        }

        /**
         * 递物筒
         */
        $('input[name=bsDiaphragmTreat]:checked').each(function () {
            jsParms.bsDiaphragmTreat = $(this).val();
        });
        if (jsParms.bsDiaphragmTreat == null || jsParms.bsDiaphragmTreat == undefined) {
            jsParms.bsDiaphragmTreat = 0;
        }

        /**
         * 安全连锁装置
         */
        $('input[name=bsFilterTransition]:checked').each(function () {
            jsParms.bsFilterTransition = $(this).val();
        });
        if (jsParms.bsFilterTransition == null || jsParms.bsFilterTransition == undefined) {
            jsParms.bsFilterTransition = 0;
        }

        /**
         * 空调
         */
        $('input[name=bsDiaphragmTransition]:checked').each(function () {
            jsParms.bsDiaphragmTransition = $(this).val();
        });
        if (jsParms.bsDiaphragmTransition == null || jsParms.bsDiaphragmTransition == undefined) {
            jsParms.bsDiaphragmTransition = 0;
        }

        /**
         * 测氧采样口
         */
        $('input[name=bsFilterRescue]:checked').each(function () {
            /**
             * 给周赋值
             */
            jsParms.bsFilterRescue = $(this).val();
        });
        if (jsParms.bsFilterRescue == null || jsParms.bsFilterRescue == undefined) {
            jsParms.bsFilterRescue = 0;
        }

        /**
         * 应急呼叫装置
         */
        $('input[name=bsDiaphragmRescue]:checked').each(function () {
            jsParms.bsDiaphragmRescue = $(this).val();
        });
        if (jsParms.bsDiaphragmRescue == null || jsParms.bsDiaphragmRescue == undefined) {
            jsParms.bsDiaphragmRescue = 0;
        }

        /**
         * 呼吸装具
         */
        $('input[name=bsElectricAspirator]:checked').each(function () {
            jsParms.bsElectricAspirator = $(this).val();
        });
        if (jsParms.bsElectricAspirator == null || jsParms.bsElectricAspirator == undefined) {
            jsParms.bsElectricAspirator = 0;
        }

        /**
         * 急救供养
         */
        $('input[name=bsPiping]:checked').each(function () {
            jsParms.bsPiping = $(this).val();
        });
        if (jsParms.bsPiping == null || jsParms.bsPiping == undefined) {
            jsParms.bsPiping = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsAirCompressor]:checked').each(function () {
            jsParms.bsAirCompressor = $(this).val();
        });
        if (jsParms.bsAirCompressor == null || jsParms.bsAirCompressor == undefined) {
            jsParms.bsAirCompressor = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsAirCompressores]:checked').each(function () {
            jsParms.bsAirCompressores = $(this).val();
        });
        if (jsParms.bsAirCompressores == null || jsParms.bsAirCompressores == undefined) {
            jsParms.bsAirCompressores = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsColdDryer]:checked').each(function () {
            jsParms.bsColdDryer = $(this).val();
        });
        if (jsParms.bsColdDryer == null || jsParms.bsColdDryer == undefined) {
            jsParms.bsColdDryer = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsColdDryeres]:checked').each(function () {
            jsParms.bsColdDryeres = $(this).val();
        });
        if (jsParms.bsColdDryeres == null || jsParms.bsColdDryeres == undefined) {
            jsParms.bsColdDryeres = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsAirTank]:checked').each(function () {
            jsParms.bsAirTank = $(this).val();
        });
        if (jsParms.bsAirTank == null || jsParms.bsAirTank == undefined) {
            jsParms.bsAirTank = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsAirTankes]:checked').each(function () {
            jsParms.bsAirTankes = $(this).val();
        });
        if (jsParms.bsAirTankes == null || jsParms.bsAirTankes == undefined) {
            jsParms.bsAirTankes = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsAirTankess]:checked').each(function () {
            jsParms.bsAirTankess = $(this).val();
        });
        if (jsParms.bsAirTankess == null || jsParms.bsAirTankess == undefined) {
            jsParms.bsAirTankess = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsWaterSepar]:checked').each(function () {
            jsParms.bsWaterSepar = $(this).val();
        });
        if (jsParms.bsWaterSepar == null || jsParms.bsWaterSepar == undefined) {
            jsParms.bsWaterSepar = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsWaterSepares]:checked').each(function () {
            jsParms.bsWaterSepares = $(this).val();
        });
        if (jsParms.bsWaterSepares == null || jsParms.bsWaterSepares == undefined) {
            jsParms.bsWaterSepares = 0;
        }
        /**
         * 急救供养
         */
        $('input[name=bsWaterPipe]:checked').each(function () {
            jsParms.bsWaterPipe = $(this).val();
        });
        if (jsParms.bsWaterPipe == null || jsParms.bsWaterPipe == undefined) {
            jsParms.bsWaterPipe = 0;
        }

        return JSON.stringify(jsParms);
    }





    function getDateTime() {
        api.openPicker({
            type: 'date_time',
            title: '选择开始日期'
        }, function (ret, err) {
            if (ret) {
                var year = ret.year;
                var month = ret.month;
                var day = ret.day;
                vm.getDateTime = '' + year +
                    '-' + month +
                    '-' + day
            }
        });
    }
</script>